package com.hl.shifangzhiyu.web;


import com.hl.shifangzhiyu.pojo.Dayi;
import com.hl.shifangzhiyu.service.DayiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dayi")
public class DayiController {

    @Autowired
   private DayiService dayiService;

    @RequestMapping("/insert")
    public int insert(@RequestBody Dayi dayi) {
        return dayiService.insert(dayi);
    }


    @RequestMapping("/select")
  public List<Dayi> selectAll() {
        return dayiService.selectAll();
    }
    @RequestMapping("/selectDafu")
    public List<Dayi> listDafu() {
        return dayiService.selectDafu();
    }
}
